﻿// -----------------------------------------------------------------------
// <copyright file="LoginViewModel.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace LoginModule.ViewModel
{
    using System.ComponentModel;
    using Model;


    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class LoginViewModel : INotifyPropertyChanged
    {
        #region Contructor

        public LoginViewModel()
        {
            _user = new User(string.Empty, string.Empty);
        }

        #endregion Contructor

        #region Member

        private User _user;

        #endregion Memeber

        #region Properties

        public User user
        {
            get
            {
                return _user;
            }

            set
            {
                _user = value;
            }
        }

        #endregion Properties

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        #region Method

        private void RaisePropertyChanged( string propertyName )
        {
            // take a copy to prevent thread issues
            PropertyChangedEventHandler handler = PropertyChanged;
            if ( handler != null )
            {
                handler( this, new PropertyChangedEventArgs( propertyName ) );
            }
        }

        public bool CheckUser(User loginUser)
        {
            bool bResut = false;

            return bResut;
        }

        #endregion Method
    }
}
